'use strict'
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const { data } = await uniCloud.request({
		url: 'https://apis.map.qq.com/ws/direction/v1/driving',
		data: {
			key: 'TGUBZ-Y7T3B-62CUI-NSEF5-LAHU6-QFFUZ',
			from: event.from,
			to: event.to,
		},
	})
	//返回数据给客户端
	return data
}
